package com.bookocean.controller.dto;

import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 评论数据传输对象
 * 
 * @author BookOcean
 * @since 2024-01-01
 */
@Data
public class CommentDto {
    
    /**
     * 评论ID
     */
    private Long id;
    
    /**
     * 评论内容
     */
    private String content;
    
    /**
     * 评论用户信息
     */
    private UserInfo user;
    
    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
    
    /**
     * 楼层号
     */
    private Integer floor;
    
    /**
     * 回复列表
     */
    private List<ReplyDto> replies;
    
    /**
     * 用户信息内部类
     */
    @Data
    public static class UserInfo {
        private Long id;
        private String nickname;
        private String avatar;
        private String title;
    }
    
    /**
     * 回复信息内部类
     */
    @Data
    public static class ReplyDto {
        private Long id;
        private String content;
        private UserInfo user;
        private String replyToUser;
        private LocalDateTime createdAt;
    }
}
